Technical Q&A QA1220
Re-enabling dragging from NSTableView to other applications


Q: When I rebuild my application on Mac OS X version 10.2, my NSTableView loses the ability to drag-and-drop to other applications. How do I fix this?

A: A bug in NSTableView in Mac OS X version 10.2 and later causes cross-application drags to not work without additional code from the application developer. Drag-and-drop within an application still works correctly.
You can work around the bug by subclassing NSTableView and overriding
-draggingSourceOperationMaskForLocal: to return the appropriate NSDragOperation (typically NSDragOperationCopy, depending upon what drag operation you want the drag-and-drop to perform). Only applications built on Mac OS X version 10.2.x are affected; applications built on 10.1.x are not affected. This bug will be fixed in a future version of Mac OS X, and you can check this Q&A at each release to determine if the bug has been fixed.


[Dec 02 2002]


Developer Documentation | Technical Notes | Development Kits | Sample Code